<template>
    <div>{{ count }}</div>
    <div>
        <el-button type="primary" @click="onChange">Change number</el-button>
    </div>
</template>

<script setup lang="ts">
import { defineProps, defineEmits } from 'vue';
const props = defineProps<{ count: number }>()
const emits = defineEmits(['count-change'])

const onChange = () => {
    console.info('onChangeonChangeonChangeonChange',)
    emits('count-change', Math.random())
}

defineExpose({
    onChange
})
</script>